//@author A0101906R
#ifndef CMDEDIT_H
#define CMDEDIT_H

#include "Cmd.h"
#include "CmdEdit.h"

namespace Twentyfifth {
	class CmdEdit : public Cmd {
	public:
		static const std::string FEEDBACK_EDITOK;
		static const std::string FEEDBACK_UNDOEDITOK;
		static const std::string ERROR_INVALIDTASK;
		static const std::string ERROR_INVALIDSTART;
		static const std::string ERROR_INVALIDEND;
		static const std::string ERROR_INVALIDDEADLINE;
		static const std::string ERROR_INVALIDSEQUENCESE;
		static const std::string ERROR_INVALIDSEQUENCEDL;
		static const std::string ERROR_EMPTYDESC;
		Task taskBeforeEdit;

		CmdEdit();

		Status execution();
		Status undo(Status::StatusCode);
		void checkExceptionForEdit(Status, DateTime, DateTime, DateTime);
		void rememberTask(Status&);
		void setDescForEdit(Status&);
		void setDescForUndo(Status&);
		void extractInfo(Status, DateTime&, DateTime&, DateTime&);
	};
}

#endif